package com.common.supply.service.impl.extdata;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.common.supply.domain.entity.extdata.CustomerCrsReport;
import com.common.supply.domain.entity.extdata.CustomerXdsReport;
import com.common.supply.mapper.extdata.CustomerXdsReportMapper;
import com.common.supply.service.ICustomerXdsReportService;
import org.springframework.stereotype.Service;


/**
 * 用户XDS征信Service业务层处理
 *
 * @author african-loan
 * @date 2021-10-28
 */
@Service
public class CustomerXdsReportServiceImpl extends ServiceImpl<CustomerXdsReportMapper, CustomerXdsReport> implements ICustomerXdsReportService {

    @Override
    public CustomerXdsReport getLocalCreditReport(String bvn) {
        QueryWrapper<CustomerXdsReport> eq = new QueryWrapper<CustomerXdsReport>().eq("bvn", bvn).eq("status", "1");
        eq.last("order by id desc limit 1");
        return getOne(eq);
    }
}
